﻿@using www.Controllers
@using www.SService
@{
    ViewBag.Title = "Danh sách nhân viên";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

@Html.ActionLink("Thêm mới", "Add", "Staff")
<div class="clear"></div>

<fieldset>
    <legend>Danh sách nhân viên</legend>
    <div class="clear"></div>
    <table style="width: 100%; height: auto; border: 1px solid #008080;" cellpadding="1" cellspacing="1">
        @if (ViewData["Data"] != null)
        {
            <tr style="background: #0000cd; color: #fff; height: 30px; font-size: 13px; font-weight: bold; text-align: center;">
                <th style="width: 15%;">Họ tên </th>
                <th style="width: 10%;">Hình ảnh</th>
                <th style="width: 7%;">Ngày sinh</th>
                <th style="width: 5%;">Giới tính</th>
                <th style="width: 8%;">CMND</th>
                <th style="width: 11%;">Email</th>
                <th style="width: 9%;">Số ĐT</th>
                <th style="width: 8%;">Trình độ</th>
                <th style="width: 8%;">Chức vụ</th>
                <th style="width: 8%;">Trạng thái</th>
                <th style="width: 11%;">Thao tác</th>
            </tr>
            foreach (var item in (List<RelaxStaffDataContract>)ViewData["Data"])
            {
            <tr style="height: 25px;">
                <td>@item.Name</td>
                <td>
                    <img src="@item.Image" style="width: 120px; height: 70px;" alt=""/></td>
                <td>@item.Birthday.ToShortDateString()</td>
                <td>@Utility.Gender(item.Gender)</td>
                <td>@item.Identification</td>
                <td>@item.Email</td>
                <td>@item.Tel</td>
                <td>@item.Degree</td>
                <td>@item.Ministry</td>
                <td>@Utility.Active(item.Active)</td>
                <td>@Html.ActionLink("Sửa", "Edit", new { id = item.Id }) | @Html.ActionLink("Xóa", "Delete", new { id = item.Id }, new { onclick = "return confirmDelete();" })| @Html.ActionLink("Chi tiết", "Detail", new { id = item.Id }) </td>
            </tr>
            }

        }

    </table>
</fieldset>
